package _18define;

public class Partition {
    public static void main(String[] args) {
        String sentence = "peter piper picked a peck of pickled peppers";
        String[] words = sentence.split (" ");
        int count = 0;

        for (String word : words) {
            if (word.startsWith ("p")) {
                count++;
            }
        }

        System.out.println ("以 'p' 开头的单词数量: " + count);

    }

}
